<?php

use Illuminate\Database\Migrations\Migration;

class Productimages extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		//
		Schema::create("product_images", function($table)
		{
			$table->increments("id");
			$table->text("imagefilename");
			
			// soft deletes
			$table->softDeletes();
			
			// timestamps
			$table->timestamps();
		});
		//
		Schema::create("product_product_images", function($table)
		{
			$table->increments("id");
			$table->integer("productid");
			$table->integer("imageid");
			
			// soft deletes
			$table->softDeletes();
			
			// timestamps
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		//
		Schema::drop("product_images");
		Schema::drop("product_product_images");
	}

}